Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update the version of Amazon.CDK.Lib that is referenced by the recipe CDK projects #818

Merged
merged 3 commits into from
Mar 21, 2024

Conversation

ashovlin
Copy link
Member

@ashovlin ashovlin commented Mar 8, 2024

Issue #, if available: N/A

Description of changes:

Our integration tests began failing for the Blazor recipe:

  • Example CI failure: https://github.com/aws/aws-dotnet-deploy/actions/runs/8193118953/job/22406129833

    2024-03-07T18:42:09.0042659Z BlazorWasm60c01024a63d82 | 6/14 | 6:37:45 PM | CREATE_FAILED | AWS::Lambda::Function | Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler (CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F) Resource handler returned message: "The runtime parameter of nodejs14.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs20.x) while creating or updating functions. (Service: Lambda, Status Code: 400, Request ID: 3674fb8b-b71f-4624-a88d-3df206a02179)" (RequestToken: f152ff23-1334-fc62-7d71-aba03b7982cb, HandlerErrorCode: InvalidRequest)

By setting AutoDeleteObjects on the S3 bucket in the recipe to true, a CDK-defined Node 14 Lambda is deployed (which is no longer supported as of 1/19/24):

This updates the Amazon.CDK.Lib for all of the recipes to the latest. I believe they went to Node 18 for custom resources in 2.87 via aws/aws-cdk#26212.

  • [WIP] - I haven't done any manual testing yet. Not sure if we might have any issues where a project deployed via 2.43.1 might fail to redeploy on 2.131.0, which we don't have covered by the current automated tests.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.45%. Comparing base (74bb0e8) to head (db28b64).
Report is 8 commits behind head on dev.

Additional details and impacted files
@@             Coverage Diff             @@
##              dev     #818       +/-   ##
===========================================
+ Coverage   32.34%   61.45%   +29.11%     
===========================================
  Files         271      277        +6     
  Lines       10604    10659       +55     
  Branches     1474     1484       +10     
===========================================
+ Hits         3430     6551     +3121     
+ Misses       6885     3568     -3317     
- Partials      289      540      +251     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ashovlin ashovlin changed the title [WIP] chore: Update the version of Amazon.CDK.Lib that is referenced by the recipe CDK projects chore: Update the version of Amazon.CDK.Lib that is referenced by the recipe CDK projects Mar 12, 2024
… log S3 bucket when creating a new bucket for the Blazor WebAssembly App recipe
@@ -132,6 +132,7 @@ private void ConfigureCloudFrontDistribution(Configuration settings)
var loggingBucket = new Bucket(this, nameof(AccessLoggingBucket), InvokeCustomizeCDKPropsEvent(nameof(AccessLoggingBucket), this, new BucketProps
{
RemovalPolicy = RemovalPolicy.RETAIN,
AccessControl = BucketAccessControl.LOG_DELIVERY_WRITE
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to the CDK version, noticed that this is failing as well due to a change in S3 behavior last year. See aws/aws-cdk#27571 for more info.

@ashovlin
Copy link
Member Author

I've manually tested that deploying an application using 1.18.6 (currently live), and then redeploying with this branch works for the Fargate and App Runner recipes. I'm struggling to redeploy a Beanstalk application with 1.18.6 both before and after, but don't think it'd be related to this change.

@ashovlin ashovlin merged commit 7e89e1d into dev Mar 21, 2024
11 checks passed
@ashovlin ashovlin deleted the shovlia/update-cdk-dependency branch March 21, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants